<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery-3.6.0.js"></script>
</head>
<body>
    <ul>
        <li>这是第一个</li>
        <li>这是第二个</li>
        <li>这是第三个</li>
        <li>这是第四个</li>
        <li>这是第五个</li>
    </ul>
    <script>
        $(function(){
            $('ul li:odd').css('background-color','pink')
        })
    </script>
</body>
</html>